#example: 3302211993xxxx4914
'''
this is for calcute the id
'''
import sys
import time
from id_validator import validator

def dateRange(year):
    fmt='%Y-%m-%d'
    bgn = int(time.mktime(time.strptime(year+'-01-01', fmt)))
    end = int(time.mktime(time.strptime(year+'-12-31', fmt)))
    list_date = [time.strftime(fmt,time.localtime(i)) for i in range(bgn,end+1,3600*24)]
    return [i.replace('-','') for i in list_date]

data_time = dateRange('1993')

def vali_dator(id1,id2,id3):
    for i in dateRange(id2):
        theid= id1 +i + id3
        if validator.is_valid(theid):
            print(theid)


#vali_dator('330221', '1993', '4914')

#fmt='%Y-%m-%d'
#print(time.mktime(time.strptime('1993'+'-01-01', fmt)))